package com.gwnet.shop.enums;

/**
 * 配送状态 1 待接单 2 待到店 3 待取货 4 待送达 5 待收货 6 完成
 * @author: WangLiang
 * @date: 2024/8/1 14:25
 */
public enum DevStatusEnum {

    WAIT_RECEIVE_ORDER("1","待接单"),
    WAIT_TO_STORE("2","待到店"),
    WAIT_PICK_UP("3","待取货"),
    WAIT_DELIVERY("4","待送达"),
    WAIT_TAKE_DEV("5","待收货"),
    SUCCESS("6","完成")

    ;


    private String code;
    private String desc;

    DevStatusEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String code() {
        return code;
    }

    public String desc() {
        return desc;
    }

    public static DevStatusEnum instance(String value) {
        DevStatusEnum[] enums = values();
        for (DevStatusEnum statusEnum : enums) {
            if (statusEnum.code().equals(value)) {
                return statusEnum;
            }
        }
        return null;
    }
}
